package tw;

class Angle extends rk4 {
	private int count;
	private double a;
	private double g;

	Angle() {
		g = -980D;
		a = 0.0D;
		count = 100;
		init(2, true);
	}

	public void derivs(double d, double ad[], double ad1[]) {
		ad1[0] = ad[1];
		ad1[1] = a * ad[0];
	}

	void advanced(double d) {
		d /= count;
		for (int i = 0; i < count; i++)
			moveNext(d);

	}

	double getAngle() {
		return super.y[0];
	}

	void setAngle(double d) {
		super.y[0] = d;
		super.y[1] = 0.0D;
	}

	void setLength(double d) {
		a = g / d;
	}
}
